<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/src/assets/css/common.css" type="text/css" />
    <title>Document</title>
</head>

<body>
    <div id="btnDiv">
        <div id="lightDiv">
            <div v-show="lightOn"></div>
            <img src="https://static.jyshare.com/libs/images/svg/img_lightBulb.svg">
        </div>
        <button v-on:click="lightOn=!lightOn">开/关</button>
    </div>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>


        const divApp = {
            data() {
                return {
                    lightOn: false,
                };
            }
        }

        Vue.createApp(divApp).mount('#btnDiv')
    </script>
</body>

</html>